<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <c:if test="${message != null && message != ''}">
	<script>
		alert('${message}');
	</script>
</c:if>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	String beginDate = request.getParameter("beginDate");
	String endDate = request.getParameter("endDate");
	if (beginDate == null)
		beginDate = "";
	if (endDate == null)
		endDate = "";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>    
    <title>客户资料维护</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=7" />
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>
	<script type="text/javascript" src="<%=path%>/js/ui.js"></script>
    <link id="editCss" rel="stylesheet" type="text/css" href="<%=path%>/css/right.css" />
    <script type="text/javascript" src="<%=path%>/js/MzCalendar.js" ></script>
	<script language="JavaScript">
   function $(id){
		if(id!=""&&id!=null){
			return document.getElementById(id);
			}else{
				alert(id);
				return null;
				}
	   }
	function doSearch(){
		var sinfo=$("searchInfo");
		var bdate=$("beginDate");
		var edate=$("endDate");
		// 查询
		if(sinfo!=null||bdate!=null||edate!=null){
				// 多条件组合查询 combination
				if(sinfo.value!=""||bdate.value!=""||edate.value!=""){
					$("searchForm").action="<%=path%>/servlet/SrhCus";
					$("searchForm").submit();
					}
		else{
							alert("未填写关键字");
							return false;
				}
		}else{
							alert("获取input对象失败 ");
							return false;
		}	
	}

    </script>
</head>
<body>
<div id="nav" class="crumbs">
	当前位置：客户管理 &gt; 客户列表
</div>

<div class="search">
	<div class="tab" >
		<span class="right"></span>
		<span class="font-blue14pxb">客户资料维护</span>
    </div>
</div>
<div class="search">
<form id="searchForm" name="searchForm" method="post" action="">
	<ul class="con minHeight">
		<li style="width:auto;">
		   <font>搜索:</font>
		   <input id="searchInfo"  name="searchInfo" type="text" class="text" style="width:140px;" value="<c:if test='${not empty param.searchInfo}'> <c:out value='${param.searchInfo}'/></c:if> <c:if test='${empty param.searchInfo}'>请输入公司名称或 ID</c:if>"  onfocus="this.value='';" />
	     </li>
	     <li style="width:auto;">
		 	 <%-- 日期搜索  --%>
			<font>最后修改日期</font>
			<input type="text" class="text" id="beginDate" name="beginDate"
			 value="<%=beginDate%>" readonly="readonly"/>
			<img src="<%=basePath%>/images/timeIco.gif" onclick="WebCalendar.start(this,document.getElementById('beginDate'), 'yyyy-MM-dd')" />
			至
			<input type="text" class="text" id="endDate" name="endDate" value="<%=endDate%>" readonly="readonly"/>
			<img src="<%=basePath%>/images/timeIco.gif" onclick="WebCalendar.start(this,document.getElementById('endDate'), 'yyyy-MM-dd')" />
		</li>
		<li style="width:auto;">
			<input type="button" class="button" name="查询" value="查询" onclick=" doSearch()" />
		</li>
    </ul>
   </form>
</div>
<jsp:include flush="true" page="cusList.jsp"></jsp:include>
<%@include file="/jsp/pagination.jsp"%>
</body>
</html>